#include <mc9s12dp512.h>     /* derivative information */
#include "sensor.h"

void set_sensor_angle(enum SENSORANGLE a)
{
	switch(a)
	{
		case FIVE:
			PTM &= 0xcf;
			break;
		case TEN:
			PTM &= 0xcf;
			PTM |= 0x10;
			break;
		case THIRTY:
			PTM &= 0xcf;
			PTM |= 0x20;
			break;
		case ONETWENTY:
			PTM |= 0x30;
			break;
	}
}

void set_sensor_direction(unsigned short angle)
{
    PTP=angle;  
}